<div class="container">
<ul class="breadcrumb">
	<li><a href="<?php echo SITE_URL ?>/home/index">Home</a> <span class="divider">/</span></li>
	<li class="active">Add post</li>
</ul>
<form class="form-horizontal" method="post" enctype="multipart/form-data">
	<?php if(!empty($msg)): ?>
	    <div class="alert <?php echo $msg['type'] ?>">
	    <?php echo $msg['text'] ?>
	    </div>
	<?php endif; ?>
	<div class="control-group">
		<label class="control-label" for="inputEmail">Title</label>
		<div class="controls">
		<input type="text" name="post_title" id="post_title" class="input-xlarge" required>
		</div>
	</div>

	<div class="control-group">
		<label class="control-label" for="selectbasic">Category</label>
		  <div class="controls">
		    <select id="category_id" name="category_id" name="selectbasic" class="input-large">
		      <?php
		      if(!empty($category)){
		      	foreach($category as $id => $val){
		      		echo "<option value='$id'>$val[1]</option>\n";
		      	}
		      }
		      ?>
		    </select>
		  </div>
	</div>

	<div class="control-group">
		<label class="control-label" for="inputEmail">Original URL</label>
		<div class="controls">
		<input type="text" id="original_url" name="original_url" class="input-xlarge">
		</div>
	</div>

	<div class="control-group">
		<label class="control-label" for="inputEmail">Image</label>
		<div class="controls">
		<input type="file" id="post_image" name="post_image" class="input-xlarge">
		</div>
		<div class="controls">
		<input type="text" name="remote_image" placeholder="http://" class="input-xlarge">
		</div>
	</div>

	<div class="control-group">
		<label class="control-label" for="selectbasic">Type</label>
		  <div class="controls">
		    <select id="item_type" name="item_type" name="selectbasic" class="input-large">
		      <option value="photo">Photo</option>
		      <option value="video">Video</option>
		      <option value="gif">Gif</option>
		    </select>
		  </div>
	</div>

	<div class="control-group">
		<label class="control-label" for="inputEmail">Source</label>
		<div class="controls">
		<input type="text" id="source_page" name="source_page" class="input-xlarge">
		</div>
	</div>

	<div class="control-group">
		<label class="control-label" for="inputEmail">Video code</label>
		<div class="controls">
		<input type="text" name="video_code" id="video_code" class="input-xlarge">
		</div>
	</div>

	<div class="form-actions">
	    <button type="submit" class="btn btn-primary">Save post</button>
	    <button type="button" class="btn">Cancel</button>
    </div>
</form>
</div>